//
// Created by (xueliang2007@qq.com):snow on 19-3-29.
//

#ifndef TEST_SORTMETHODS_H
#define TEST_SORTMETHODS_H

#include <iostream>
#include <algorithm>
#include <cassert>

/*辅助输出数组*/
template <typename T>
void showArray(T *a, int size);

void selectSort(int *a, int size);

void bubbleSort(int *a, int size);

void insertSort(int *a, int size);

void shellSort(int *a, int size);

struct mergeSort{
    mergeSort(int* a, int size);
    void merging(int *list1, int size1, int* list2, int size2, const int K_MAX_SIZE);
};

struct heapSort{
    heapSort(int *a, int size);
    void heapJust(int *a, int s, int n); //s是树的第s层
};

struct quickSort {
    quickSort(int* a, int size);
    void qsort(int* a, int low, int high);
    int Partition(int* a, int low, int high);
};



#endif //TEST_SORTMETHODS_H
